package com.ezops.dao.facade;

import java.io.Serializable;
import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.ezops.dao.ExceptionReportDAO;
import com.ezops.dao.generics.dao.hibernate.GenericDAO;
import com.ezops.dao.generics.search.Search;
import com.ezops.models.TradeExceptions;

@Service
public class TradeExceptionFacade extends
		DataTransferFacadeImpl<TradeExceptions> implements ITradeExceptionFacade {

	@Autowired
	private ExceptionReportDAO dao;

	
	/* (non-Javadoc)
	 * @see com.ezops.dao.facade.ITradeExceptionFacade#getExceptionByClient(java.lang.Integer)
	 */
	@Override
	public List<TradeExceptions> getExceptionByClient(Integer clientId) {
		Search searchCriteria = new Search();
		searchCriteria.addFilterEqual("clientId", clientId);
		return dao.search(searchCriteria);
	}

	@Override
	public GenericDAO<TradeExceptions, Serializable> getDataAccessObject() {
		// TODO Auto-generated method stub
		return dao;
	}

}
